ERR_UNSUPPORTED_VALUE,
ERR_EXPECTING_AT_LEAST_ONE_POINT,
ERR_EXPECTING_NAME_AND_POINTS,
+ ERR_INCOMPATIBLE_SERVER_VERSION,
ERR_MEM_ALLOC, // This is a critical error.
} siridb_insert_err_t;
case ERR_TIMESTAMP_OUT_OF_RANGE:
return "Received at least one time-stamp which is out-of-range.";
case ERR_UNSUPPORTED_VALUE:
- return "Unsupported value received. (only integer and float "
+ return "Unsupported value received. (only integer, float and string "
"values are supported).";
case ERR_EXPECTING_AT_LEAST_ONE_POINT:
return "Expecting a series to have at least one point.";
case ERR_EXPECTING_NAME_AND_POINTS:
return "Expecting a map with name and points.";
+ case ERR_INCOMPATIBLE_SERVER_VERSION:
+ return "At least one server is incompatible for handling this "
+ "insert.";
case ERR_MEM_ALLOC:
return "Critical memory allocation error";
default:
switch (qp_next(unpacker, qp_obj))
{
case QP_RAW:
+ if (siridb_servers_check_version(siridb, "2.0.27") > 0)
+ {
+ return ERR_INCOMPATIBLE_SERVER_VERSION;
+ }
qp_add_raw(packer, qp_obj->via.raw, qp_obj->len);
break;
case ERR_UNSUPPORTED_VALUE:
case ERR_EXPECTING_AT_LEAST_ONE_POINT:
case ERR_EXPECTING_NAME_AND_POINTS:
+ case ERR_INCOMPATIBLE_SERVER_VERSION:
case ERR_MEM_ALLOC:
{
/* something went wrong, get correct err message */